New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular: Fix incomplete property metadata when using inheritance #15586
Angular: Fix incomplete property metadata when using inheritance #15586
Conversation
Nx Cloud ReportCI ran the following commands for commit e1963b1. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
Sounds reasonable to me. I wonder if there are possible regressions with this change but since child props overwrite parent props this should just work I think @ThibaudAV I'm not too familiar with the changed code in the angular-beta renderer. What do you think? 🙂 |
What about add some test to be sure future changes don't break this ? 🙏 I haven't looked yet but it seems to me that there is a function exported by angular core that does this job. I'll look into using it if I have time later. Also LGTM :) |
@stefan-schweiger @kroeder @ThibaudAV does this snapshot diff look correct? Snapshot name: `Storyshots Basics / Component / With Inheritance icon button 1`
<storybook-wrapper>
<storybook-icon-button
ng-reflect-icon="this is icon"
+ ng-reflect-label="this is label"
>
<button>
this is label - this is icon
</button>
</storybook-icon-button> |
@shilman I guess this happens because before the "default" value was not set because the docs didn't extract the property correctly. So I think this should be correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've updated the snapshots & am going to call this done!
Issue: #15580
What I did
If the component has a parent then also iterate the decorated property metadata of the parent and merge it (child metadata has a higher "priority" when merging).